package com.atguigu.practice;

import java.util.Scanner;

public class CalPrimeNumber {
    public static void main(String[] args) {
        int count=0;
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int[] array=new int[n+1];
        for(int i=2;i<n;i++){
            if(array[i]==0){
                count++;
            }
            for(int j=i;j<n;j+=i){
                array[j]=1;
            }
        }
        System.out.println(count);
    }
}
